/**
 * Created by Administrator on 2017/3/27.
 */
/**
 * Created by win7 on 2017/3/15.
 */
import Relay from "react-relay";

export default class FindByPhoneMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findByPhone }`;
    }

    getVariables() {
        return {
            argsInput: {
                phone:this.props.phone
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findByPhonePayload {
            findByPhone {
                errorCode
                value
                totalResult
                id
                token
                userModel{
                    name
                    uid
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on findByPhonePayload {
                findByPhone {
                    errorCode
                    value
                    totalResult
                    id
                    token
                    userModel{
                        name
                        uid
                    }
                    }
                }
            `]
        }];
    }

}